import { GetSpuPageInfo } from '@/api/product/spu'
export default {
  state: {
    spuList: []
  },
  mutations: {
    UPDATE_SPULIST(state, spuList) {
      state.spuList = spuList
    }
  },
  actions: {
    async getSpuList({ commit }, { page, limit, category3Id }) {
      const result = await GetSpuPageInfo(page, limit, category3Id)
      if (result.code === 200) {
        commit('UPDATE_SPULIST', result.data)
      }
    }
  }
}
